
<?php
echo $this->Form->input('Rubros', array('empty' => 'Seleccionar'));

echo '<div class="btn-toolbar">';
echo $this->Ajax->submit('Agregar Rubro', array('url'=> array('controller'=>'productos', 'action'=>'updateRubro', 0, 0), 'update' => 'tablaRubros', 'condition' => '$("#Rubros").val() > 0', 'class' => 'btn btn-primary'));
echo '</div>';
?>

<table class="table table-striped">

    <?php echo $this->Html->tableHeaders(array('Nombre')); ?>

    <?php foreach ($tRubros as $i => $rubro): ?>
    <tr>
		<?php echo $this->Form->hidden('Rubro.'.$i);?>
        <td><?php echo $rubro;
		echo $this->Ajax->submit('&times;', array('url'=> array('controller'=>'productos', 'action'=>'updateRubro', 3, $i), 
					'update' => 'tablaRubros', 'class' => 'close', 'confirm' => 'Esta seguro que desea quitar el rubro?', 'escape' => false, 'title' => "Quitar"));?>
		</td>
		
    </tr>
    <?php endforeach; ?>

</table>